Home > biomechZoo > Toolbox > Support Functions > pointonline.m

pointonline

PURPOSE ^

pt = POINTONLINE(p1,p2,pos) returns a point on a line a distance pos from p1

SYNOPSIS ^

function pt = pointonline(p1,p2,pos)

DESCRIPTION ^

 pt = POINTONLINE(p1,p2,pos) returns a point on a line a distance pos from p1

 ARGUMENTS
  p1  ...  first point m x 3 matrix
  p2  ...  second point m x 3 matrix
  pos ...  distance from p1

 RETURN
  pt  ...  point on line between p1 and p2, a distance pos from p1

 ex find the midpoint between v1 = [8 3 2], v2 = [23 4 1];

 pt = pointonline(v1,v2,0.5)

 Created by Phil Dixon January 2011

 Updated October 2012
 - function can handle nx3 matrices

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sun 10-Mar-2024 22:39:06 by m2html © 2005